package alingrad.engine.graphics;

import javax.microedition.khronos.opengles.GL10;

import alingrad.engine.collisions.CollisionMaskData;

public class Texture {
	private final int mID;
	private final int mTarget;

	public final int mWidth;
	public final int mHeight;

	public final CollisionMaskData mData;

//	public int mImageWidth;
//	public int mImageHeight;

	public Texture(final int target, final int id, final int width, final int height, final CollisionMaskData data) {
		mTarget = target;
		mID = id;
		mWidth = width;
		mHeight = height;
		mData = data;
//		mImageWidth = imageWidth;
//		mImageHeight = imageHeight;
	}

	public void bind(GL10 gl) {
		gl.glBindTexture(mTarget, mID);
	}

	public void destroy(GL10 gl) {
		int temp[] = new int[1];
		temp[0] = mID;
		gl.glDeleteTextures(1, temp, 0);
	}


}
